package com.bole.dao;

import com.bole.pojo.TbAdminDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
public interface AdminDao extends JpaRepository<TbAdminDo, Long> {
    @Query("from TbAdminDo where id = ?1")
    TbAdminDo findTbAdminDoById(Long id);

    @Query("from TbAdminDo where username = ?1")
    TbAdminDo findTbAdminDoByName(String username);
}
